﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OplugAbpProject.Transaction
{
    [Table("Merchant")]
    public class Merchant : Entity<long>, IHasCreationTime, ICreationAudited, IMayHaveTenant, IHasModificationTime
    {
        public DateTime CreationTime { get; set; } = DateTime.Now;
        public long? CreatorUserId { get; set; }
        public int? TenantId { get; set; }
        public DateTime? LastModificationTime { get; set; }
        public string SysRowID { get; set; } = Guid.NewGuid().ToString();
        [Required]
        [MaxLength(50)]
        public string MerchName { get; set; }
        [MaxLength(500)]
        public string Address { get; set; }
        [MaxLength(500)]
        public string Community { get; set; }
        [MaxLength(20)]
        public string City { get; set; }
        [MaxLength(20)]
        public string Province { get; set; }
        [MaxLength(20)]
        public string Country { get; set; }
        [MaxLength(50)]
        public string Contractor { get; set; }
        /// <summary>
        /// 营业执照号码
        /// </summary>
        [MaxLength(50)]
        public string BusinessLicenseNo { get; set; }
        /// <summary>
        /// 经营范围
        /// </summary>
        [MaxLength(50)]
        public string BusinessScope { get; set; }
        /// <summary>
        /// 建筑结构
        /// </summary>
        [MaxLength(50)]
        public string BuildingStructure { get; set; }
        [MaxLength(50)]
        public string Telphone { get; set; }
        /// <summary>
        /// 占地面积
        /// </summary>
        [MaxLength(50)]
        public decimal Areas { get; set; } = 0;
        /// <summary>
        /// 土地所有权形式
        /// </summary>
        [MaxLength(50)]
        public string LandOwner { get; set; }
        /// <summary>
        /// 房屋所有权形式
        /// </summary>
        [MaxLength(50)]
        public string HouseOwner { get; set; }
        public decimal? PosX { get; set; }
        public decimal? PosY { get; set; }
        [Column(TypeName = "text")]
        public string CommentText { get; set; }
        /// <summary>
        /// 所属行业
        /// </summary>
        [Required]
        public int CategoryId { get; set; }

        [MaxLength(50)]
        public string CategoryName { get; set; }

        public bool isActive { get; set; }
        public bool isRec { get; set; }
        public int Stars { get; set; } = 1;
        /// <summary>
        /// 商户状态
        /// </summary>
        [MaxLength(8)]
        public string Staus { get; set; }
        /// <summary>
        /// 商户图片
        /// </summary>
        [MaxLength(500)]
        public string PictureURL { get; set; }
        /// <summary>
        /// 商户Logo
        /// </summary>
        [MaxLength(500)]
        public string Logo { get; set; }

    }
}
